<?php

namespace app\index\controller;

use think\exception\ValidateException;
use app\model\Users;

class AdminController extends Base
{

	public function detail()
	{
		$user = Users::getadminbyopenid();

		if ($user) {
			$data = $user;
		} else {
			$data = 0;
			$message = '您不是管理员！';
		}

		return $this->json(['message' => $message, 'data' => $data]);
	}
}
